﻿Imports System.Data.OleDb
Imports System.Data
Public Class RateReciepe
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btnSearch_Click(sender As Object, e As EventArgs) Handles btnSearch.Click
        Dim objBl = New BL()
        ''Dim objDal = New DL()

        Dim dbconn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("/App_Data/KitchenCompition.mdb"))
        Dim strSelect As String = "SELECT Reciepe.Id, Reciepe.Name, Reciepe.Email, Reciepe.RecipeName, Reciepe.Recipe, Reciepe.Price, Reciepe.UserId, Reciepe.Duration FROM(Reciepe) WHERE (((Reciepe.RecipeName) Like '%" + txtSearch.Text + "%'));"
        Dim dt As DataTable = New DataTable()
        dt = objBl.GetDataAccess(strSelect, dbconn)
        gvRecipe.DataSource = dt
        gvRecipe.DataBind()
    End Sub
End Class